
//
// 110108 - AH - Created.
//

package org.soekrat.engine.retrieval.forest;

import org.soekrat.engine.forest.Forest;
import org.soekrat.engine.forest.Tree;
import org.soekrat.engine.forest.TreeVisitor;

/**
 * <p>
 *   {@link TreeVisitor} used by
 *   {@link ForestRetrievalStrategy#rinse(Forest)}.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC)
 */
final class ForestRinseTreeVisitor implements TreeVisitor 
{
  /**
   * <p>
   *   Shared single instance.
   * </p>
   */
  public static final TreeVisitor INSTANCE=new ForestRinseTreeVisitor();
  
  // Singleton pattern dictates private constructor.
  private ForestRinseTreeVisitor(){}
  
  // Specified in TreeVisitor.
  public void visit(Tree tree) 
  {
    tree.removeAttribute("key");    
    
  }
  
}
